home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / FPSE_src / include / fpse.h.bak < prev    next >
Text File  |  2000-01-01  |  3KB  |  147 lines

  1. #include "type.h"
  2.  
  3. #ifdef MSB_FIRST
  4. #define SWAP16(val) ({ UINT16 x = val; x = (x << 8) | (x >> 8); x; })
  5. #define SWAP32(val) ({ UINT32 x = val; x = (x << 24) | ((x << 8) & 0xff0000) | ((x >> 8) & 0xff00) | (x >> 24); x; })
  6. #else
  7. #define SWAP16(val) val
  8. #define SWAP32(val) val
  9. #endif
  10.  
  11. #include "init.h"
  12. #include "mem.h"
  13. #include "opdef.h"
  14. #include "cpu2.h"
  15. #include "gte.h"
  16. #include "bios.h"
  17. #include "hw.h"
  18. #include "compile.h"
  19. #include "win.h"
  20. #include "runtime.h"
  21. #include "cdrom.h"
  22. #include "dis.h"
  23. #include "cd.h"
  24. #include "sio.h"
  25. #include "rs232.h"
  26. #include "joydrv.h"
  27. #include "joypad.h"
  28. #include "mdec.h"
  29. #include "gpu.h"
  30. #include "spu.h"
  31. #include "coff.h"
  32.  
  33. #if defined(__WIN32__)
  34. #include <stdio.h>
  35. #include <stdlib.h>
  36. #include <stdarg.h>
  37. #include <conio.h>
  38. #include <memory.h>
  39. #include <malloc.h>
  40. #include <string.h>
  41. #include <io.h>
  42. #include <time.h>
  43. #include <fcntl.h>
  44. #include <ctype.h>
  45. #include <sys/types.h>
  46. #ifdef __WATCOMC__
  47. #include <direct.h>
  48. #else
  49. #include <dirent.h>
  50. #endif
  51. #include <sys/stat.h>
  52.  
  53. #elif defined(AMIGA)
  54. #include <stdio.h>
  55. #include <stdlib.h>
  56. #include <stdarg.h>
  57. #include <memory.h>
  58. #include <malloc.h>
  59. #include <string.h>
  60. #include <time.h>
  61. #include <fcntl.h>
  62. #include <ctype.h>
  63. #include <dirent.h>
  64. #include <unistd.h>
  65. #include <sys/types.h>
  66. #include <sys/stat.h>
  67. #ifndef O_BINARY
  68. #define O_BINARY 0
  69. #endif
  70.  
  71. #else
  72. #error FPSE cannot be compiled on your system.
  73. #error Add your system in FPSE.H file before compiling.
  74. #endif
  75.  
  76. // FPSE compiled version (BCD format)
  77. #define FPSE_VERSION    0x0008
  78.  
  79. // add-on
  80. #define FRAMESKIP   0
  81. #define AUTOSPEED   0
  82.  
  83. // Flags
  84. #define DISASMFLG       0x0001
  85. #define EMULATE_BIOS    0x0002
  86. #define VERBOSE         0x0004
  87. #define IN_SLOT         0x0008
  88. #define STOP            0x0010
  89. #define SET_ESI         0x0020
  90. #define COMPILE         0x0040
  91. #define CDUSECACHE      0x0080
  92. #define DEBUG           0x0100
  93. #define ACTIONREPLAY    0x0200
  94. #define USESERIAL       0x0400
  95.  
  96. #define PSX_COUNTRY     0x030000
  97.  
  98. // Other Flags in FPSE_Flags:
  99. ///////////////////////////////
  100. // Country USA    = 0x010000
  101. // Country Europe = 0x020000
  102. // Country Japan  = 0x030000
  103.  
  104. #define USE_AMERICAN_PSX  0x010000
  105. #define USE_EUROPE_PSX    0x020000
  106. #define USE_JAPAN_PSX     0x030000
  107.  
  108. #define disasmflg       (FPSE_Flags & DISASMFLG)
  109. #define emulate_bios    (FPSE_Flags & EMULATE_BIOS)
  110. #define verbose         (FPSE_Flags & VERBOSE)
  111. #define in_slot         (FPSE_Flags & IN_SLOT)
  112. #define stop            (FPSE_Flags & STOP)
  113. #define compile         (FPSE_Flags & COMPILE)
  114. #define cdusecache      (FPSE_Flags & CDUSECACHE)
  115. #define debug           (FPSE_Flags & DEBUG)
  116. #define actionreplay    (FPSE_Flags & ACTIONREPLAY)
  117. #define useserial       (FPSE_Flags & USESERIAL)
  118. #define psx_country     (FPSE_Flags & PSX_COUNTRY)
  119.  
  120. #define PRINTF  if (verbose) printf
  121.  
  122. typedef struct {
  123.     char   *BiosName;
  124.     char   *ComName;
  125.     char   *Mcd1Name;
  126.     char   *Mcd2Name;
  127. } FPSECfgType;
  128.  
  129. void run_debug(void);
  130. void LoadCFG(void);
  131.  
  132. extern UINT8   *ram;
  133. extern UINT8   *rom;
  134. extern UINT8   *scratchpad;
  135. extern UINT8   *extrom;
  136. extern FPSECfgType FPSEIni;
  137.  
  138. extern R3000_REG reg;
  139. extern int       Irq_Pulse;
  140. extern int       FPSE_Flags;
  141.  
  142. // Added in AmigaPPC porting (from SETUP.C file)
  143. extern char *OS_Name;
  144. extern char *OS_PorterName;
  145. extern char *OS_ExtendedMsg;
  146.  
  147. int OS_CheckOption(char *str);